package cs3343.project.family.UI;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import cs3343.project.family.Card;
import cs3343.project.family.Character;
import cs3343.project.family.UI.ToolCardFrame;

public class YesNoFrame extends JFrame {

static String action = "";
	
	public YesNoFrame(Character character, Card card, String cardType) {
		
		String[] option = ToolCardFrame.availableCards(character, cardType);	
		
		action = (String) JOptionPane.showInputDialog(YesNoFrame.this,
			 card.getDescription(), cardType, JOptionPane.INFORMATION_MESSAGE, 
			 null, option, "None");
		 
		if (action == null)
			character.setEsteem(character.getEsteem() - 50);
		else if (action == "None")
			character.setEsteem(character.getEsteem() + 50);
		else {
			//TODO tool card function
		}
	}
}
